package com.sunny.fetch.pojo;

import java.util.Date;
import javax.persistence.*;

@Table(name = "sun_site")
public class SunSite {
    @Id
    @Column(name = "site_id")
    private Long siteId;

    /**
     * 站点url
     */
    @Column(name = "base_url")
    private String baseUrl;

    /**
     * 站点名称
     */
    @Column(name = "site_name")
    private String siteName;

    /**
     * 是否采集过
     */
    @Column(name = "is_collected")
    private Byte isCollected;

    /**
     * 上次采集时间
     */
    @Column(name = "last_collected_time")
    private Date lastCollectedTime;

    /**
     * 添加时间
     */
    @Column(name = "add_time")
    private Date addTime;

    /**
     * 添加用户
     */
    @Column(name = "add_user")
    private Long addUser;

    public SunSite(Long siteId, String baseUrl, String siteName, Byte isCollected, Date lastCollectedTime, Date addTime, Long addUser) {
        this.siteId = siteId;
        this.baseUrl = baseUrl;
        this.siteName = siteName;
        this.isCollected = isCollected;
        this.lastCollectedTime = lastCollectedTime;
        this.addTime = addTime;
        this.addUser = addUser;
    }

    public SunSite() {
        super();
    }

    /**
     * @return site_id
     */
    public Long getSiteId() {
        return siteId;
    }

    /**
     * @param siteId
     */
    public void setSiteId(Long siteId) {
        this.siteId = siteId;
    }

    /**
     * 获取站点url
     *
     * @return base_url - 站点url
     */
    public String getBaseUrl() {
        return baseUrl;
    }

    /**
     * 设置站点url
     *
     * @param baseUrl 站点url
     */
    public void setBaseUrl(String baseUrl) {
        this.baseUrl = baseUrl;
    }

    /**
     * 获取站点名称
     *
     * @return site_name - 站点名称
     */
    public String getSiteName() {
        return siteName;
    }

    /**
     * 设置站点名称
     *
     * @param siteName 站点名称
     */
    public void setSiteName(String siteName) {
        this.siteName = siteName;
    }

    /**
     * 获取是否采集过
     *
     * @return is_collected - 是否采集过
     */
    public Byte getIsCollected() {
        return isCollected;
    }

    /**
     * 设置是否采集过
     *
     * @param isCollected 是否采集过
     */
    public void setIsCollected(Byte isCollected) {
        this.isCollected = isCollected;
    }

    /**
     * 获取上次采集时间
     *
     * @return last_collected_time - 上次采集时间
     */
    public Date getLastCollectedTime() {
        return lastCollectedTime;
    }

    /**
     * 设置上次采集时间
     *
     * @param lastCollectedTime 上次采集时间
     */
    public void setLastCollectedTime(Date lastCollectedTime) {
        this.lastCollectedTime = lastCollectedTime;
    }

    /**
     * 获取添加时间
     *
     * @return add_time - 添加时间
     */
    public Date getAddTime() {
        return addTime;
    }

    /**
     * 设置添加时间
     *
     * @param addTime 添加时间
     */
    public void setAddTime(Date addTime) {
        this.addTime = addTime;
    }

    /**
     * 获取添加用户
     *
     * @return add_user - 添加用户
     */
    public Long getAddUser() {
        return addUser;
    }

    /**
     * 设置添加用户
     *
     * @param addUser 添加用户
     */
    public void setAddUser(Long addUser) {
        this.addUser = addUser;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", siteId=").append(siteId);
        sb.append(", baseUrl=").append(baseUrl);
        sb.append(", siteName=").append(siteName);
        sb.append(", isCollected=").append(isCollected);
        sb.append(", lastCollectedTime=").append(lastCollectedTime);
        sb.append(", addTime=").append(addTime);
        sb.append(", addUser=").append(addUser);
        sb.append("]");
        return sb.toString();
    }
}